import kotlin.math.absoluteValue

class Player03(
    //下划线定义的为临时变量，只用一次
    _name: String,
    var age:Int,
    var isNormal:Boolean
) {
    var name = _name
        get() = field.capitalize()
        private set(value) {
            field = value.trim()
        }
    //次构造函数
    constructor(name: String):this(name, age=10, isNormal = false)
    constructor(name: String, age: Int):this(name, age=10, isNormal = false) {
        this.name = name.toUpperCase()
    }
}

fun main() {
    val player02 = Player03("jack", 20, true)
    val player03 =  Player03("rose")
}